package com.asj.house.controller;


import com.asj.house.entity.HouseRoomMap;
import com.asj.house.returns.RespEntity;
import com.asj.house.returns.RespTable;
import com.asj.house.service.HouseRoomMapService;
import com.asj.house.vo.param.RoomParam;
import io.swagger.annotations.Api;
import java.util.List;

import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 房屋地图信息表 前端控制器
 * </p>
 *
 * @author asj
 * @since 2021-03-16
 */
@RestController
@RequestMapping("/house-room-map")
@Api(value = "地图信息接口", tags = "地图信息接口")
public class HouseRoomMapController {

    @Resource
    private HouseRoomMapService houseRoomMapService;

    @GetMapping("/list")
    @ApiOperation(value = "房源地图信息列表")
    public RespTable<List<HouseRoomMap>> listHouseRoomMap(RoomParam roomParam) {
        RespTable<List<HouseRoomMap>> respTable = houseRoomMapService.listHouseRoomMap(roomParam);
        return respTable;
    }

    @PutMapping("/update")
    @ApiOperation(value = "房源地图信息数据")
    public RespEntity updateHouseRoomMap(@RequestBody HouseRoomMap houseRoomMap) {
        RespEntity respEntity = houseRoomMapService.updateHouseRoomMap(houseRoomMap);
        return respEntity;
    }

}
